﻿<Window x:Class="DependencyVisualizer.SelectAssembliesPage"
      xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
      xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
      xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
      xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
      mc:Ignorable="d"  WindowStartupLocation="CenterScreen"
      Height="400" Width="600"
	Title="Select Assemblies for Analysis" FontFamily="Segoe UI">
    <Window.Resources>
        <ResourceDictionary>
            <ResourceDictionary.MergedDictionaries>
                <ResourceDictionary Source="pack://application:,,,/theeg.DependencyAnalysis.CommonAddin;component/Resources/CommonStyles.xaml"></ResourceDictionary>
            </ResourceDictionary.MergedDictionaries>
            <DataTemplate x:Key="AssemblyTemplate">
                <StackPanel Orientation="Horizontal" MinHeight="16">
                    <Button Style="{StaticResource FlatButtonStyle}" Click="Remove" HorizontalAlignment="Left">
                        <Viewbox Width="16">
                            <Canvas Width="100" Height="100">
                                <Path Stroke="OrangeRed" StrokeThickness="12" Fill="#01000000">
                                    <Path.Data>
                                        <EllipseGeometry RadiusX="47" RadiusY="47" Center="50,50" />
                                    </Path.Data>
                                </Path>
                                <Path Stroke="OrangeRed" StrokeThickness="12">
                                    <Path.Data>M15,50L85,50</Path.Data>
                                </Path>
                            </Canvas>
                        </Viewbox>
                    </Button>
                    <TextBlock Text="{Binding}" Foreground="White" Margin="2"></TextBlock>
                </StackPanel>
            </DataTemplate>
        </ResourceDictionary>
    </Window.Resources>
    <Border Background="Black">
        <Grid Margin="5">
            <Grid.RowDefinitions>
                <RowDefinition Height="Auto"></RowDefinition>
                <RowDefinition Height="*"></RowDefinition>
            </Grid.RowDefinitions>
            <Border Grid.Row="0" VerticalAlignment="Bottom" BorderBrush="#FF25334B" BorderThickness="2"></Border>
            <StackPanel Orientation="Horizontal">
                <Button Grid.Row="0" Style="{StaticResource FlatButtonStyle}" Click="AddAssemblyClick" HorizontalAlignment="Left">
                    <StackPanel Orientation="Horizontal">
                        <Viewbox Width="25">
                            <Canvas Width="100" Height="100">
                                <Path Stroke="LawnGreen" StrokeThickness="6" Fill="#01000000">
                                    <Path.Data>
                                        <EllipseGeometry RadiusX="47" RadiusY="47" Center="50,50" />
                                    </Path.Data>
                                </Path>
                                <Path Stroke="LawnGreen" StrokeThickness="6">
                                    <Path.Data>M15,50L85,50 M50,15 L50,85</Path.Data>
                                </Path>
                            </Canvas>
                        </Viewbox>
                        <TextBlock FontWeight="Bold" VerticalAlignment="Center" FontSize="16" Margin="5,0,5,0">Add an assembly</TextBlock>
                    </StackPanel>
                </Button>
                <Button Grid.Row="0" Style="{StaticResource FlatButtonStyle}" Click="ResetClick" HorizontalAlignment="Left">
                    <StackPanel Orientation="Horizontal">
                        <Viewbox Width="25">
                            <Canvas Width="100" Height="100">
                                <Path Stroke="OrangeRed" StrokeThickness="6" Fill="#01000000">
                                    <Path.Data>
                                        <EllipseGeometry RadiusX="47" RadiusY="47" Center="50,50" />
                                    </Path.Data>
                                </Path>
                                <Path Stroke="OrangeRed" StrokeThickness="6">
                                    <Path.Data>M27,27L73,73 M27,73 L73,27</Path.Data>
                                </Path>
                            </Canvas>
                        </Viewbox>
                        <TextBlock FontWeight="Bold" VerticalAlignment="Center" FontSize="16" Margin="5,0,5,0">Clear selection</TextBlock>
                    </StackPanel>
                </Button>
                <Button Grid.Row="0" Style="{StaticResource FlatButtonStyle}" Click="Confirm" HorizontalAlignment="Left">
                    <StackPanel Orientation="Horizontal">
                        <Viewbox Width="25">
                            <Canvas Width="100" Height="100">
                                <Path Stroke="#FFFFFFFF" StrokeThickness="6" Fill="#01000000">
                                    <Path.Data>
                                        <EllipseGeometry RadiusX="47" RadiusY="47" Center="50,50" />
                                    </Path.Data>
                                </Path>
                                <Path Stroke="#FFFFFFFF" StrokeThickness="6">
                                    <Path.Data>M27,40L73,40 M27,60 L73,60</Path.Data>
                                </Path>
                            </Canvas>
                        </Viewbox>
                        <TextBlock FontWeight="Bold" VerticalAlignment="Center" FontSize="16" Margin="5,0,5,0">Confirm</TextBlock>
                    </StackPanel>
                </Button>
            </StackPanel>

            <ListBox Grid.Row="1" x:Name="files" Background="Black" ItemTemplate="{StaticResource AssemblyTemplate}"></ListBox>
        </Grid>
    </Border>
</Window>
